0 REM" PONZO*83*WATERLOO 1 [143]" 9 POKE53281,15:POKE53280,12:PRINT"[144]" 10 PRINT"[147] C64 TUTOR-6 15 [153]"ORTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN^" 20 [153]"(null)  MORE 6510 MACHINE LANGUAGE WAIT (null)":MS$[178]" WELCOME! " 25 [153]"/TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANEXPSTOP" 35 [141]60000:[141]63100:[141]63000 40 [153]"LOADLET'S LOOK AT HOW BASIC CMDCMDCMDCMDCMDCMDFREFREFREFREFREFRE" 50 [153]" CLEARS THE SCREEN " 60 [153]"WE'LL DISASSEMBLEWAIT THE MACHINE LANGUAGE" 70 [153]"(ASSUMED TO BE AT $E06B)." 80 [153]"IT'S HANDY IF YOU HAVE AN EXTENDED" 90 [153]"MONITOR LIKE EXTRAMONWAIT OR MICROMONWAIT!!":[141]63000 100 [153]"LOAD., E068 A9 20 LDA #$23 101 PRINT"., E06A 9D 00 80 STA $0400,X 102 [153]"., E06D 9D 00 81 STA $0500,X 103 PRINT"., E070 9D 00 82 STA $0600,X 104 [153]"., E073 9D 00 83 STA $0700,X 105 PRINT"., E076 CA DEX 106 [153]"., E077 D0 F1 BNE $E06A":[141]63000 110 [153]"., E068 A9 20 LDA #$23 " 111 [153]"., E06A 9D 00 80 STA $0400,X" 112 [153]"., E06D 9D 00 81 STA $0500,X" 113 [153]"., E070 9D 00 82 STA $0600,X" 114 [153]"., E073 9D 00 83 STA $0700,X" 115 [153]"., E076 CA DEX " 116 [153]"., E077 D0 F1 BNE $E06A " 120 [153]"(null)RECOGNIZE THE ASSEMBLERWAIT INSTRUCTIONS?":[141]63000 130 [153]"., E068 A9 20 WAITLDA #$23 " 131 [153]"., E06A 9D 00 80 WAITSTA $0400,X" 132 [153]"., E06D 9D 00 81 WAITSTA $0500,X" 133 [153]"., E070 9D 00 82 WAITSTA $0600,X" 134 [153]"., E073 9D 00 83 WAITSTA $0700,X" 135 [153]"., E076 CA WAITDEX " 136 [153]"., E077 D0 F1 WAITBNE $E06A " 140 [153]"(null)THESE ARE THE HEX BYTES THAT ARE " 150 [153]" ACTUALLY IN MEMORY. ":[141]63000 160 [153]"., E068 WAITA9 20 LDA #$23 161 PRINT"., E06A [146]9D 00 80 STA $0400,X 162 [153]"., E06D WAIT9D 00 81 STA $0500,X 163 PRINT"., E070 [146]9D 00 82 STA $0600,X 164 [153]"., E073 WAIT9D 00 83 STA $0700,X 165 PRINT"., E076 [146]CA DEX 166 [153]"., E077 WAITD0 F1 BNE $E06A 170 PRINT"[209]THESE ARE THE LOCATIONS IN MEMORY" 180 PRINT" WHICH CONTAIN THE M-L CODE.":GOSUB63000 181 MS$=" ONWARD ":GOSUB63100 185 PRINT"[147]NOW LET'S LOOK AT HOW A BASIC " 186 PRINT"NEW[146] IS DONE. WE'LL PRETEND THE" 187 PRINT"CODE IS FROM $B5D4 TO $B5E8." 188 PRINT"RECALL THAT THE FIRST 3 BYTES" 189 PRINT"AT $0800/$0801/$0802 MUST BE 00 00 00[146]." 190 PRINT"BUT $0800 ALWAYS HAS 00[146] ANYWAY SO" 191 PRINT"WE JUST FILL $0801/$0802 WITH 00[146]." 192 PRINT"[209]THE START OF BASIC[146] IS KEPT IN $2B/$2C." 193 PRINT"[209]THE END OF BASIC[146], KEPT IN $2D/$2E," 194 PRINT"MUST BE JUST 2 BYTES PAST THE START[146]." 195 PRINT"LET'S SEE HOW IT'S DONE..":GOSUB63000 196 PRINT"[147]"; 220 PRINT"., B5D4 A9 00 LDA #$00 [146]_" 221 PRINT"., B5D6 A8 TAY [146]_" 230 GOSUB63400:PRINT"BOTH A[146] AND Y[146] ARE FILLED " 240 PRINT"WITH #$00[146]..TO START.":GOSUB63000 250 PRINT"., B5D7 91 2B STA ($2B),Y[146][145][145] [157] [157]_" 260 GOSUB63400:PRINT"SINCE $2B[146] CONTAINS THE" 270 PRINT"THE START OF BASIC,(USUALLY $0801)" 280 PRINT"#$00[146] IS STORED IN ($2B)+Y.":GOSUB63000 290 GOSUB63400:PRINT"THEN INY[146] GETS READY TO STORE #$00[146] INTO" 300 PRINT"THE SECOND BYTE OF 'BASIC' AT (USUALLY)" 310 PRINT"$0802." 320 PRINT"., B5D9 C8 INY [146][145] [157]_":GOSUB63000 330 PRINT"., B5DA 91 2B STA ($2B),Y[146][145] [157]_" 340 GOSUB63400:PRINT"THERE SHE GOES!":GOSUB63000 350 GOSUB63400:PRINT"THE END[146] OF BASIC NOW HAS TO" 360 PRINT"BE CHANGED TO READ $0803[146]..AND END" 370 PRINT"IS STORED AT $2D/$2E[146].":GOSUB63000 371 PRINT"., B5DC A5 2B LDA $2B [146][145] [157]_" 380 GOSUB63400:PRINT"SO WE LDA $2B[146] GETTING READY" 390 PRINT"TO ADD 2..":GOSUB63000 400 GOSUB63400:PRINT"BUT REMEMBER TO CLC[146] FIRST!":GOSUB63000 410 PRINT"., B5DE 18 CLC [146][145] [157]_":GOSUB63000 420 PRINT"., B5DF 69 02 ADC #$02 [146][145] [157]_" 430 GOSUB63400:PRINT"SEE..WE ADD 2.":PRINT"THEN WE STORE THIS LO-BYTE" 440 PRINT"INTO $2D.":GOSUB63000 450 PRINT"., B5E1 85 2D STA $2D [146][145] [157]_":GOSUB63000 460 GOSUB63400:PRINT"NOW WE MUST FIX UP THE HI-BYTE AT $2E." 470 PRINT"WE LDA $2C[146] WHICH WILL GO TO $2E.":GOSUB63000 480 PRINT"., B5E3 A5 2C LDA $2C [146][145] [157]_":GOSUB63000 490 GOSUB63400:PRINT"BUT, JUST IN CASE THERE'S A CARRY[146]" 500 PRINT"LEFT OVER FROM THE ADC #$02[146] WE..":GOSUB63000 510 PRINT"., B5E5 69 00 ADC #$00 [146][145] [157]_":GOSUB63000 520 GOSUB63400:PRINT"NOW[157][157][157][184][184][184][145] WE CAN STICK THE HI-BYTE" 530 PRINT"INTO $2E.":GOSUB63000 540 PRINT"., B5E7 85 2E STA $2E [146][145] [157]_":GOSUB63000 550 GOSUB63400:MS$="NICE!NICE![146]":GOSUB63100:GOSUB63000 560 PRINT"[147]NOW LET'S LOOK AT HOW BASIC CHAINING[146]" 570 PRINT"MIGHT BE ACCOMPLISHED IN BASIC ." 571 PRINT"(THE STATEMENTS IN BASIC ARE LINKED[146]" 572 PRINT"AND THESE LINKS MUST BE RECREATED" 573 PRINT"EACH TIME WE INSERT OR MODIFY." 574 PRINT"THAT'S CHAINING[146].)" 580 PRINT"RECALL THAT BASIC STATEMENTS ARE STORED" 590 PRINT"FROM $0801 IN THE FOLLOWING FORMAT:":GOSUB63000:PRINT"[147]" 600 BA$="[178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192] [178][192][192][192][192][178][192][192][192][192]"+CHR$(13) 610 Z$="[221] [221] [160][160][160][221][160][160] [160][221][160] [160][160][221] [160][160][160][221]--[221] [221] [221]"+CHR$(13) 620 BA$=BA$+Z$+Z$+Z$+"[177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192] [177][192][192][192][192][177][192][192][192][192]"+CHR$(13)+"[145][145][145][145]" 630 PRINTBT$"[145][145][145][145][145][145][145]"BA$+"LINKLINKSTMTSTMTBASICZEROLINK" 640 PRINT"BYTEBYTENUMNUMTEXT BYTEBYTE" 650 PRINT" LO  HI  LO  HI AREA=END LO" 660 M1$=BT$+"[145][145] ^^^^ ^^^^[146]":PRINTM1$:PRINT"[209]THIS IS THE ADDRESS OF THE NEXT" 670 PRINT"BASIC STATEMENT.":GOSUB63000 680 M2$=BT$+"[145][145] ^^^^ ^^^^[146]":PRINTM2$ 690 PRINT"[209]THIS IS BASIC STATEMENT NUMBER:" 700 PRINT"LO-BYTE THEN HI-BYTE.":GOSUB63000 710 M3$=BT$+"[145][145] ^^^^-^[146]":PRINTM3$ 720 PRINT"[209]THIS IS THE BASIC TEXT ITSELF.":GOSUB63000 740 M4$=BT$+"[145][145] ^^^^[146]":PRINTM4$ 750 PRINT"[209]END-OF-STATEMENT.":GOSUB63000 760 M5$=BT$+"[145][145] ^^^^[146]":PRINTM5$ 770 PRINT"[209]THE NEXT LINK.":GOSUB63000 775 PRINTM5$"[157][157][157][157] " 780 GOSUB39000:PRINT"[209]WE WILL LOOK IN $2B/$2C TO" 790 PRINT"FIND THE START OF BASIC (USUALLY $0801)" 800 PRINT"POINTING TO THE FIRST LINK (LO-BYTE).":PRINTM1$"[157][157][157][157] ":GOSUB63000 810 PRINT"[209]THEN WE WILL MARCH THROUGH TO THE END" 820 PRINT"OF THE FIRST BASIC STATEMENT....":PRINTM4$ 830 GOSUB63000:PRINT"AND STORE THE ADDRESS OF THE NEXT[146] LINK.." 840 PRINTM5$:GOSUB63000:PRINT"INTO THE LINKS AT $0801/$0802." 850 PRINTM5$"[157][157][157][157] ":PRINTM1$:GOSUB63000 860 GOSUB39000:PRINTM1$"[157][157][157][157] " 870 PRINT"[209]IN FACT, ONCE AT THE LO-BYTE OF THE" 880 PRINT"LINK WE CAN JUMP AHEAD 5 BYTES BEFORE" 890 PRINT"WE TEST FOR THE 00[146] BYTE MARKING THE" 900 PRINT"END OF THE CURRENT BASIC STATEMENT.":GOSUB63000 910 FORT=1TO200:NEXT:PRINTM2$:FORT=1TO200:NEXT:PRINTM3$:FORT=1TO200:NEXT 915 PRINTM4$:GOSUB63000 920 PRINT"[147]., B4B6 A5 2B LDA $2B " 921 PRINT"., B4B8 A4 2C LDY $2C " 922 PRINT"., B4BA 85 22 STA $22 " 923 PRINT"., B4BC 84 23 STY $23 " 930 PRINT"WE GET THE START-OF-BASIC ADDRESS FROM" 940 PRINT"$2B/$2C AND STORE IT IN $22/$23." 950 PRINT"WE WILL BE MODIFYING THIS ADDRESS AND" 960 PRINT"WILL DO THE MODIFYING TO THE COPY AT" 970 PRINT"$22/$23." 980 PRINT"THE CONTENTS OF $22/$23 WILL HOLD THE" 990 PRINT"LO-BYTE LINK[146] AS WE MARCH THROUGH" 1000 PRINT"THE BASIC STATEMENTS." 1010 PRINT"TO START WITH IT HOLDS $0801.":GOSUB63000 1020 PRINT"[147]., B4BE 18 CLC " 1030 PRINT"WE DO THIS CLC[146] IN PREPARATION" 1040 PRINT"FOR AN ADC[146] LATER ON..":GOSUB63000 1050 PRINT"[147]., B4BF A0 01 LDY #$01 " 1060 PRINT"., B4C1 B1 22 LDA ($22),Y" 1070 PRINT"NOW THE A-REGISTER HOLDS THE BYTE" 1080 PRINT"STORED AT $0802." 1090 PRINT"THAT'S THE HI-BYTE LINK[146] TO THE" 1100 PRINT"NEXT BASIC STATEMENT." 1120 PRINT"IF THIS IS 00[146] THEN WE MUST BE AT" 1130 PRINT"END OF THE PROGRAM!" 1140 PRINT"(REMEMBER..END-OF-PROGRAM HAS 00[146] 00[146] 00[146]" 1150 PRINT"WHICH IMPLIES A 00[146] HI-BYTE LINK.":GOSUB63000 1160 PRINT"., B4C3 F0 1C BEQ $B4E1 " 1170 FORT=1TO20:PRINTCL$:NEXT:PRINT"..SO WE TEST IT FOR ZERO" 1180 PRINT"AND BEQ[146] TO $B4E1 WHICH IS AN EXIT" 1190 PRINT"FROM THIS ROUTINE!":GOSUB63000 1200 PRINT"[147]., B4B6 A5 2B LDA $2B 1201 [153]"., B4B8 A4 2C LDY $2C 1202 PRINT"., B4BA 85 22 STA $22 1203 [153]"., B4BC 84 23 STY $23 1204 PRINT"., B4BE 18 CLC 1205 [153]"., B4BF A0 01 LDY #$01 1206 PRINT"., B4C1 B1 22 LDA ($22),Y 1207 [153]"., B4C3 F0 1C BEQ $B4E1 1210 PRINT"THAT'S WHAT WE HAVE SO FAR." 1220 PRINT"NOW WE'RE GOING TO MOVE AHEAD 5 BYTES" 1230 PRINT"AND START CHECKING EACH BYTE FROM THERE" 1240 PRINT"FOR THE 00[146] END-OF-STATEMENT.":GOSUB63000 1250 PRINT"[147]., B4C5 A0 04 LDY #$04 " 1260 PRINT"., B4C7 C8 INY " 1270 PRINT"., B4C8 B1 22 LDA ($22),Y" 1280 PRINT"., B4CA D0 FB BNE $B4C7 " 1290 PRINT"HERE WE LDY #$04[146] THEN INY[146] WHICH" 1300 PRINT"MAKES $(22),Y[146] 5 BYTES PAST OUR 'BASE'" 1310 PRINT"AT THE LO-BYTE LINK[146]." 1320 PRINT"WE CHECK THIS BYTE FOR 00[146], TO SEE" 1340 PRINT"IF IT'S THE END-OF-STATEMENT, AND" 1350 PRINT"B[146]RANCH IF N[146]OT E[146]QUAL TO ZERO TO THE" 1360 PRINT"INY[146] INSTRUCTION. FROM NOW ON WE MOVE" 1370 PRINT"A BYTE AT A TIME, LOOKING FOR 00[146]," 1380 PRINT"AND STAY IN THIS LOOP UNTIL WE DO!":GOSUB63000 1390 PRINT"[147]EVENTUALLY WE FIND THE END-OF-STATEMENT" 1400 PRINT"AND MUST NOW DETERMINE THE ADDRESS OF" 1410 PRINT"OF THE 'NEXT'[157][157][157][157][157][184][184][184][184] [145] LO-BYTE LINK[146]." 1420 PRINT"TWO THINGS ARE DONE WITH THIS ADDRESS." 1430 PRINT"1:IT WILL BE STORED IN THE EARLIER" 1440 PRINT" LINKS (ORIGINALLY $0801/$0802)." 1450 PRINT"2:OUR 'BASE' (KEPT IN $22/$23)" 1460 PRINT" ORIGINALLY WAS THE LINK AT $0801." 1470 PRINT" $22/$23 WILL BE CHANGED TO POINT":PRINT" TO THIS 'NEXT' LINK." 1475 PRINT"AT THE MOMENT WE'RE (Y) BYTES PAST" 1476 PRINT"THE ADDRESS IN $22/$23." 1480 PRINT"LET'S FORGE AHEAD[146]...":MS$="GO!GO!GO![146]":GOSUB63000:GOSUB63100 1490 PRINT"[147]., B4CC C8 INY " 1500 PRINTSD$"INY[146] ADVANCES 1 BYTE PAST THE 00[146]" 1510 PRINT"END-OF-STATEMENT TO THE 'NEXT' LO-LINK[146]." 1520 PRINT"NOW ($22),Y[146] POINTS TO THE 'NEXT'" 1530 PRINT"LO-LINK[146] AND WE DO OUR '2 THINGS'" 1540 PRINT"WITH THIS ADDRESS..":GOSUB63000 1541 PRINT"., B4CD 98 TYA " 1542 PRINT"., B4CE 65 22 ADC $22 " 1543 PRINT"., B4D0 AA TAX " 1544 PRINT"., B4D1 A0 00 LDY #$00 " 1545 PRINT"., B4D3 91 22 STA ($22),Y" 1550 PRINTSD$;:FORT=1TO10:PRINTCL$:NEXT 1560 PRINTSD$"[209]WE ADC[146] THE ADDRESS AT $22[146] TO Y[146].." 1570 PRINT"BUT ADC[146] ONLY WORKS WITH THE A-REGISTER" 1580 PRINT"SO WE TYA[146] FIRST THEN[157][157][157][157][183][183][183][183][145] ADC $22[146].":GOSUB63000 1581 PRINT"., B4CD 98 TYA " 1582 PRINT"., B4CE 65 22 ADC $22 ":GOSUB63000 1590 PRINTSD$"[209]NOW A[146] CONTAINS THE LO-BYTE OF THE" 1600 PRINT"NEW 'BASE' ADDRESS=THE 'NEXT' LO-LINK[146]." 1605 PRINT"WE SAVE THIS MAGIC BYTE IN 'X'..":GOSUB63000 1606 PRINT"., B4D0 AA TAX ":GOSUB63000 1610 PRINTSD$"[209]THEN PUT IT INTO $0801 WHICH IS THE" 1620 PRINT"ADDRESS CURRENTLY HELD IN $22/$23." 1630 PRINT"WE DO THIS WITH STA[146] INTO ($22),0" 1635 PRINT"WHICH REQUIRES 'Y=0' SO WE LDY #$00[146]" 1640 PRINT"THEN[157][157][157][157][183][183][183][183][145] STA ($22),Y[146]!":GOSUB63000 1641 PRINT"., B4D1 A0 00 LDY #$00 " 1642 PRINT"., B4D3 91 22 STA ($22),Y":GOSUB63000 1650 PRINTSD$;:FORI=1TO15:PRINTCL$:NEXT 1655 MS$="GO!GO!GO![146]":GOSUB63100 1660 PRINTSD$;:FORI=1TO15:PRINTCL$:NEXT 1661 PRINT"., B4D5 98 TYA " 1662 PRINT"., B4D6 65 23 ADC $23 " 1663 PRINT"., B4D8 C8 INY " 1664 PRINT"., B4D9 91 22 STA ($22),Y" 1670 PRINTSD$"WE HAVE THE LO-LINK FIXED UP." 1680 PRINT"NOW FOR THE HI-LINK.":GOSUB63000 1690 PRINTSD$"";:FORI=1TO8:PRINTCL$:NEXT 1700 PRINTSD$"[209]WE CLEAR THE A-REGISTER TO 00" 1710 PRINT"WITHOUT[146] AFFECTING ANY CARRY " 1720 PRINT"LEFT OVER FROM THE EARLIER ADC $22[146].":GOSUB63000 1721 PRINT"., B4D5 98 TYA ":GOSUB63000 1730 PRINTSD$"[209]THEN WE ADC $23[146]" 1740 PRINT"ADDING THE CARRY BIT (IF ANY!)" 1750 PRINT"TO THE HI-BYTE OF OUR NEW 'BASE'" 1760 PRINT"ADDRESS IN $22/$23-WHICH ALWAYS" 1780 PRINT"POINTS TO THE LO-LINK.":GOSUB63000 1781 PRINT"., B4D6 65 20 ADC $23 ":GOSUB63000 1790 PRINTSD$"";:FORI=1TO8:PRINTCL$:NEXT 1800 PRINTSD$"[209]WE NOW HAVE THE HI-BYTE OF OUR" 1810 PRINT"NEW LO-LINK ADDRESS IN 'A' AND" 1820 PRINT"WE NEED TO STUFF IT INTO $0802" 1830 PRINT"WHICH IS 1 BYTE PAST $0801 AND" 1840 PRINT"$0801 IS HELD IN $22/$23!!!":GOSUB63000 1850 MS$="  OUCH!! [146]":GOSUB63100 1851 PRINT"., B4D8 C8 INY " 1852 PRINT"., B4D9 91 22 STA ($22),Y":GOSUB63000 1890 PRINT"[147]., B4B6 A5 2B LDA $2B 1891 [153]"., B4B8 A4 2C LDY $2C 1892 PRINT"., B4BA 85 22 STA $22 1893 [153]"., B4BC 84 23 STY $23 1894 PRINT"., B4BE 18 CLC 1895 [153]"., B4BF A0 01 LDY #$01 1896 PRINT"., B4C1 B1 22 LDA ($22),Y 1897 [153]"., B4C3 F0 1C BEQ $B4E1 1898 PRINT"., B4C5 A0 04 LDY #$04 1899 [153]"., B4C7 C8 INY 1900 PRINT"., B4C8 B1 22 LDA ($22),Y 1901 [153]"., B4CA D0 FB BNE $B4C7 1902 PRINT"., B4CC C8 INY 1903 [153]"., B4CD 98 TYA 1904 PRINT"., B4CE 65 22 ADC $22 1905 [153]"., B4D0 AA TAX 1906 PRINT"., B4D1 A0 00 LDY #$00 1907 [153]"., B4D3 91 22 STA ($22),Y 1908 PRINT"., B4D5 98 TYA 1909 [153]"., B4D6 65 23 ADC $23 1910 PRINT"., B4D8 C8 INY 1920 [153]"., B4D9 91 22 STA ($22),Y 1930 PRINTBT$"[145][145]WHAT'S LEFT TO DO???[146]":GOSUB63000 1940 PRINT"[147]WE'VE FIXED THE LINKS AT $0801/$0802." 1950 PRINT"THEY POINT TO THE 'NEXT' LO-BYTE LINK." 1960 PRINT"THAT'S THE FIRST OF OUR '2 THINGS' DONE." 1970 PRINT"NOW[146] WE STORE THE 'NEXT' LO-LINK" 1980 PRINT"ADDRESS INTO $22/$23 AND START ALL" 1990 PRINT"OVER AGAIN WITH THIS NEW BASE[146]!!" 2000 PRINT"(AT LEAST UNTIL WE RUN ACROSS 00 00 00[146]" 2010 PRINT"SIGNIFYING THE END-OF-PROGRAM).":GOSUB63000 2020 PRINT"[147]YOU MAY NOT REALIZE IT BUT WE HAVE" 2030 PRINT"THIS 'NEW BASE' ADDRESS(=THE ADDRESS" 2040 PRINT"OF THE 'NEXT' LO-LINK) IN X[146] AND A[146]." 2050 PRINT"X HAS THE LO-BYTE!":PRINT"A HAS THE HI-BYTE!!" 2060 MS$=" CLEVER![146] ":GOSUB63000:GOSUB63100 2070 PRINT"[147]LET'S SEE IT ALL..PAY ATTENTION!":GOSUB63000 2071 PRINT"[147]., B4B6 A5 2B LDA $2B 2072 [141]63002:[153]"., B4B8 A4 2C LDY $2C 2073 GOSUB63002:PRINT"., B4BA 85 22 STA $22 2074 [141]63002:[153]"., B4BC 84 23 STY $23 2075 GOSUB63002:PRINT"., B4BE 18 CLC 2076 [141]63002:[153]"., B4BF A0 01 LDY #$01 2077 GOSUB63002:PRINT"., B4C1 B1 22 LDA ($22),Y 2078 [141]63002:[153]"., B4C3 F0 1C BEQ $B4E1 2079 GOSUB63002:PRINT"., B4C5 A0 04 LDY #$04 2080 [141]63002:[153]"., B4C7 C8 INY 2081 GOSUB63002:PRINT"., B4C8 B1 22 LDA ($22),Y 2082 [141]63002:[153]"., B4CA D0 FB BNE $B4C7 2083 GOSUB63002:PRINT"., B4CC C8 INY 2084 [141]63002:[153]"., B4CD 98 TYA 2085 GOSUB63002:PRINT"., B4CE 65 22 ADC $22 2086 [141]63002:[153]"., B4D0 AA TAX 2087 GOSUB63002:PRINT"., B4D1 A0 00 LDY #$00 2088 [141]63002:[153]"., B4D3 91 22 STA ($22),Y 2089 GOSUB63002:PRINT"., B4D5 98 TYA 2090 [141]63002:[153]"., B4D6 65 23 ADC $23 2100 GOSUB63002:PRINT"., B4D8 C8 INY 2101 [141]63002:[153]"., B4D9 91 22 STA ($22),Y 2102 GOSUB63002:PRINT"., B4DB 86 22 STX $22 " 2103 GOSUB63002:PRINT"., B4DD 85 23 STA $23 " 2104 GOSUB63002:PRINT"., B4DF 90 DE BCC $B4BF[146]_BRANCH BACK" 2105 PRINT" TO $B4BF" 2106 PRINT" & REPEAT!" 4999 PRINT:GOSUB63000:PRINT"[147]":MS$="AU REVOIR![146]":GOSUB63100:END 39000 PRINT"";:FORI=1TO17:PRINTCL$:NEXT:PRINT"";:RETURN 40098 POKEA(0),32:FORTT=1TOPP:NEXT:FORI=0TO6:POKEA(I+1),32 40099 POKEA(I),VAL(MID$(N$,I+1,1))+48:FORTT=1TOPP:NEXT:NEXT:POKEA(7),48:RETURN 40110 FORI=0TO7:POKEA(I),160:FORTT=1TOPP:NEXT 40111 POKEA(I),VAL(MID$(N$,I+1,1))+48:NEXT:RETURN 40120 FORI=0TO7:POKEP(I),160:FORTT=1TOPP:NEXT 40121 POKEP(I),VAL(MID$(N$,I+1,1))+48:NEXT:RETURN 40130 FORI=0TO7:POKEX(I),160:FORTT=1TOPP:NEXT 40131 POKEX(I),VAL(MID$(N$,I+1,1))+48:NEXT:RETURN 40140 FORI=0TO7:POKEY(I),160:FORTT=1TOPP:NEXT 40141 POKEY(I),VAL(MID$(N$,I+1,1))+48:NEXT:RETURN 40160 FORI=0TO7:POKEM(I),160:FORTT=1TOPP:NEXT 40161 POKEM(I),VAL(MID$(N$,I+1,1))+48:NEXT:RETURN 41120 FORI=0TO7:POKEP(I),160:FORTT=1TOPP:NEXT 41121 POKEP(I),PEEK(A(I)):NEXT:RETURN 41130 FORI=0TO7:POKEX(I),160:FORTT=1TOPP:NEXT 41131 POKEX(I),PEEK(A(I)):NEXT:RETURN 41140 FORI=0TO7:POKEY(I),160:FORTT=1TOPP:NEXT 41141 POKEY(I),PEEK(A(I)):NEXT:RETURN 41160 FORI=0TO7:POKEM(I),160:FORTT=1TOPP:NEXT 41161 POKEM(I),PEEK(A(I)):NEXT:RETURN 41340 FORI=0TO7:POKEA(I),160:FORTT=1TOPP:NEXT 41341 POKEA(I),PEEK(X(I)):NEXT:RETURN 41360 FORI=0TO7:POKEM(I),160:FORTT=1TOPP:NEXT 41361 POKEM(I),PEEK(X(I)):NEXT:RETURN 41410 FORI=0TO7:POKEA(I),160:FORTT=1TOPP:NEXT 41411 POKEA(I),PEEK(Y(I)):NEXT:RETURN 41460 FORI=0TO7:POKEM(I),160:FORTT=1TOPP:NEXT 41461 POKEM(I),PEEK(Y(I)):NEXT:RETURN 60000 REM INITIALIZE 60001 BT$="":FORI=1TO24:BT$=BT$+"":NEXT 60002 PT$="[176][192][192][192][192][192][192][192][192][192][192][174][157][157][157][157][157][157][157][157][157][157][157][157][221][221][157][157][157][157][157][157][157][157][157][157][157][157][173][178][192][192][192][192][192][192][192][192][178][189]" 60003 PT$=PT$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][206][163][163][163][163][163][163][163][163][163][163][163][163][205][157][157][157][157][157][157][157][157][157][157][157][157][157][157][165]============[167]" 60004 PT$=PT$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][208][207][163][163][163][163][163][163][163][163][163][163][208][207][145][145][145][145][157][157][157][157][157][157][157][157][157][157][157][157]" 60005 PT$=BT$+"[145][145][145][145][145][145]"+PT$+"[144]" 60007 ML$="" 60008 WD=40:CRT=1024:PRINTCHR$(142) 60009 W2=WD/2:W3=WD-1:W1$=MID$(STR$(WD),2): 60010 W2$=MID$(STR$(W2),2):W3$=MID$(STR$(W3),2) 60019 SD$="":CL$="":FORI=1TOWD-1:CL$=CL$+" ":NEXT 60020 RETURN 63000 PRINTBT$CL$; 63001 PRINTBT$"RETURN[146] TO CONTINUE"; 63002 GETZ$:IFZ$<>""THEN63002 63003 GETZ$:IFZ$=""THEN63003 63004 RETURN 63010 PRINTBT$CL$;:FORTT=1TO50:NEXT 63011 PRINTBT$"[166][166][166][166][166][166][166][166]RETURN TO SEE IT HAPPEN[146][166][166][166][166][166][166][166][166]";:FORTT=1TO50:NEXT 63012 GETZ$:IFZ$<>""THEN63012 63013 GETZ$:IFZ$=""THEN63013 63014 RETURN 63100 FORT=1TO5:PRINTPT$MS$; 63101 PRINTPT$" "; 63102 PRINTPT$MS$;:NEXT 63103 RETURN 63200 GOSUB63000 63201 PRINTSD$;:FORT=1TO15:PRINTCL$:NEXT:PRINTSD$;:RETURN 63300 GOSUB63100:GOSUB63010:RETURN 63400 PRINT"";:FORI=1TO5:PRINTCL$:NEXT:PRINT"";:RETURN 63999 GOSUB60000:PRINT"[147]":GOTO2020